﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SendMail.ascx.cs" Inherits="SendMail" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
    <table cellpadding="0" cellspacing="0" width="100%" class="admintable">
    
        <tr>
            <td class="lable" style="height: 24px">
                Người nhận: <strong><span style="color: #ff0000">(*)</span></strong>
            </td>
            <td style="height: 24px">
                <asp:TextBox ID="txtMailTo" runat="server" Width="350px"></asp:TextBox>
                </td>
        </tr>
        <tr>
            <td class="lable">
                Tiêu đề:</td>
            <td>
                 <asp:TextBox ID="txtTitle" runat="server" Width="350px" 
                     Text=""></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Nhập tiêu đề" ControlToValidate="txtTitle" SetFocusOnError="True"></asp:RequiredFieldValidator>
                </td>
        </tr>
         <tr>
            <td class="lable">
                Nội dung: 
            </td>
            <td>
                 <FCKeditorV2:FCKeditor ID="txtNContent" ToolbarSet="Default" Width="100%" Height="450"
                    BasePath="~/FCKeditor/" runat="server" />
                    <asp:CustomValidator runat="server" ErrorMessage="Nhập nội dung" ID="CustValDesc"
                    ControlToValidate="txtNContent" ClientValidationFunction="ValidateFCK" ValidateEmptyText="True"></asp:CustomValidator>
                    </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <asp:Button ID="btnSave" runat="server"  Text="Gửi" CssClass="command" OnClick="btnGui_Click" Width="65px" />
                <br />
                <asp:Label ID="lblMsg" runat="server" Text="" style="font-weight: bold;"></asp:Label>
            </td>
        </tr>
    </table>
<script language="javascript" type="text/javascript">
function ValidateFCK(source, args) {

var fckBody = FCKeditorAPI.GetInstance('<%=txtNContent.ClientID %>');
args.IsValid = fckBody.GetXHTML(true) != "";
}
</script>